package com.fortune.rainshinecommon.exceptions;

import com.fortune.rainshinecommon.enums.ExceptionEnum;

/**
 * @ClassName: ExceptionJson
 * @Description: 这里用一句话描述这个类的作用
 * @author zhangxin
 * @date 2019年3月20日
 */
public class MethodException extends RuntimeException{

	private static final long serialVersionUID = 123703869447817808L;
	
	private Integer code;
    private Object msg;
    
    

    public MethodException(Integer code, Object msg) {
		super();
		this.code = code;
		this.msg = msg;
	}

	public MethodException(ExceptionEnum eceptionEnum) {
        this.code = eceptionEnum.getErrCode();
        this.msg = eceptionEnum.getErrMsg();
    }

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public Object getMsg() {
		return msg;
	}

	public void setMsg(Object msg) {
		this.msg = msg;
	}

   
}
